Skip to content

Comments

chore(llmobs): move agent manifest to _dd field#16621

Open
ncybul wants to merge 5 commits intomainfrom
nicole-cybul/move-agent-manifest
Open

chore(llmobs): move agent manifest to _dd field#16621
ncybul wants to merge 5 commits intomainfrom
nicole-cybul/move-agent-manifest

Conversation

@ncybul
Copy link
Contributor

@ncybul ncybul commented Feb 20, 2026

Description

This PR nests the agent manifest under the _dd field within the metadata which will be filtered out on the FE. The goal is to move all fields that are internally used to this nested scope to avoid clashing with user-submitted metadata.

Corresponding PR to update the FE to check for the agent manifest under this new scope.

Testing

Risks

Additional Notes

@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Feb 20, 2026

Codeowners resolved as

.github/CODEOWNERS                                                      @DataDog/python-guild @DataDog/apm-core-python
ddtrace/llmobs/_integrations/claude_agent_sdk.py                        @DataDog/ml-observability
tests/contrib/claude_agent_sdk/test_claude_agent_sdk_llmobs.py          @DataDog/ml-observability

@datadog-datadog-prod-us1

This comment has been minimized.

@ncybul ncybul added the changelog/no-changelog A changelog entry is not required for this PR. label Feb 23, 2026
@ncybul ncybul marked this pull request as ready for review February 23, 2026 09:35
@ncybul ncybul requested review from a team as code owners February 23, 2026 09:35
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 930d14a689

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +409 to +410
metadata_dd = metadata.get("_dd") or {}
metadata_dd["agent_manifest"] = span._get_ctx_item(AGENT_MANIFEST)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle non-dict _dd metadata before writing manifest

If user-supplied metadata already contains _dd as a truthy non-dict (for example {"_dd": "custom"}), metadata.get("_dd") or {} returns that value and metadata_dd["agent_manifest"] = ... raises a TypeError. _submit_llmobs_span catches TypeError and drops the event, so agent spans are silently lost for this input shape; _dd should be validated/coerced to a dict before mutation.

Useful? React with 👍 / 👎.

Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why I was pulled as codeowner for: tests/contrib/claude_agent_sdk/test_claude_agent_sdk_llmobs.py

might need to update CODEOWNERS

but regardless, this change lgtm

@ncybul ncybul requested a review from a team as a code owner February 23, 2026 09:52
@ncybul ncybul requested a review from RamyElkest February 23, 2026 09:52
@ncybul
Copy link
Contributor Author

ncybul commented Feb 23, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Feb 23, 2026

View all feedbacks in Devflow UI.

2026-02-23 14:37:04 UTC ℹ️ Start processing command /merge


2026-02-23 14:37:13 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-02-23 18:43:04 UTC ⚠️ MergeQueue: This merge request was unqueued

devflow unqueued this merge request: It did not become mergeable within the expected time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants